<%@ page import="java.util.List"%>
<%@ page import="domain.model.group.Group"%>
<%@ page import="domain.model.user.User"%>

<h2>${title}</h2>
<div>${msg}</div>
<p>Remove One of the Group Members Below:</p>

<div id="queryContents">


	<table border="1" style="border-collapse: collapse;">
		<tr>
		<th>Name</th>
		<th>&nbsp;</th>
		</tr>

		<%
		List<User> members = (List<User>)request.getAttribute("memberList");
	
		if(members.isEmpty())
		{
			%>

		<h2>There are no members to remove</h2>

		<%
			
		}
		
		for(User u: members)
		{
	%>

		<tr>
			<td><%=u.getFirstName()%> <%=u.getLastName()%></td>
			<td id="btn_<%=u.getId()%>">

				<button onclick="removeMember(<%=u.getId()%>,<%=u.getVersion()%>);">Remove</button>
			</td>
		</tr>

		<%
		}
	%>
	</table>
</div>
<!--closing queryContents -->
